<div class="pageContent">
	
	<form method="post" action="/index.php?act=formula&st=formula_add" class="pageForm required-validate" onsubmit="return validateCallback(this, dialogAjaxDone)">
		<div class="pageFormContent" layoutH="58">

			<input type="hidden" name="big_class_id" value="{$prduce.parent_id}" />
			<input type="hidden" name="small_class_id" value="{$prduce.product_id}" />
			<div class="unit">
				<dl>
					<label>微信端可见用户：</label>
					<dd>
						{if $category}
						<table border="1" width="600px" style="padding:0 0 0 0;margin:0 0 0 0;">		
							<tbody>
								{foreach item=items from=$category}
								<tr width="100%" style="padding:0 0 0 0;margin:0 0 0 0;">						
									<td>
										<label>
											<input type="checkbox" group="visible_{$items.user_category_id}[]" class="checkboxCtrl" checked/>{$items.category_name}
											<input type="hidden" name="visible[]" value="{$items.user_category_id}">
										</label>
									</td>
									<td>
									{foreach item=child from=$items.child}
										<label>
											<input type="checkbox" name="visible_{$items.user_category_id}[]" value="{$child.user_category_id}"  checked/>{$child.category_name}
										</label>
									{/foreach}
									</td>
								</tr>
								{/foreach}
							</tbody>
						</table>
						{/if}
					</dd>
				</dl>
				<br/><br/><br/><br/><br/><br/><br/><br/><br/>
			</div>

			<div class="unit">
				<dl>
					<label>价格字段：</label>
					<dd>
						{if $price_list}
						<table border="1" width="600px" style="">		
							<tbody>
								{foreach item=items from=$price_list key=key}
									<tr width="100%" align="left">
										<td rowspan="{$items.count}">
											<label>
												<input type="checkbox" group="price_{$items.id}[]" class="checkboxCtrl"/>{$items.price_name}
												<input type="hidden" name="category[]" value="{$items.id}">
											</label>
										</td>
									</tr>
									{foreach item=children from=$items.childs}
										<tr width="100%" style="padding:0 0 0 0;margin:0 0 0 0;" align="left">
											<td rowspan="{$children.count}">
												<label>
													<input type="checkbox" groups="price_{$children.id}[]" name="price_{$items.id}[]" class="checkboxCtrl" {if !$children.childs}value="{$items.id},{$children.id}"{/if}/>{$children.price_name}
												</label>
											</td>
											{if !$children.childs}
											<td>
												<label>
													<input type="checkbox" value="" disabled/>—— ——
												</label>
											</td>
											{/if}
										</tr>
										{foreach item=child from=$children.childs}
											<tr width="100%" style="padding:0 0 0 0;margin:0 0 0 0;" align="left">
												<td>
													<label>
														<input type="checkbox" name="price_{$items.id}[]" tag="price_{$children.id}[]" value="{$items.id},{$children.id},{$child.id}"/>{$child.price_name}
													</label>
												</td>
											</tr>
										{/foreach}
									{/foreach}
								{/foreach}
							</tbody>
						</table>
						{else}
						未添加价格字段
						{/if}
					</dd>
				</dl>
				<br/><br/><br/><br/><br/><br/>
			</div><br/><br/><br/><br/><br/><br/>

		</div>
		
		<div class="formBar">
			<ul>
				<li><div class="buttonActive"><div class="buttonContent"><button type="submit">提交</button></div></div></li>
				<li><div class="button"><div class="buttonContent"><button type="button" class="close">取消</button></div></div></li>
			</ul>
		</div>

	</form>

</div>
